package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: MemberAddRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-18
 * @Version: 1.0
 * Table: pear_member
 * Comment:
 * 用户表
 */
public class MemberAddRequestConvert extends BaseConvert {
    public static MemberWithBLOBs convert(MemberAddRequest request) throws Exception {
        MemberWithBLOBs daoRequest = new MemberWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setAccount(daoRequest.getAccount() == null ? null : daoRequest.getAccount().trim());
        daoRequest.setPassword(daoRequest.getPassword() == null ? null : daoRequest.getPassword().trim());
        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setMobile(daoRequest.getMobile() == null ? null : daoRequest.getMobile().trim());
        daoRequest.setRealname(daoRequest.getRealname() == null ? null : daoRequest.getRealname().trim());
        daoRequest.setLastLoginTime(daoRequest.getLastLoginTime() == null ? null : daoRequest.getLastLoginTime().trim());
        daoRequest.setSex(daoRequest.getSex() == null ? null : daoRequest.getSex().trim());
        daoRequest.setAvatar(daoRequest.getAvatar() == null ? null : daoRequest.getAvatar().trim());
        daoRequest.setIdcard(daoRequest.getIdcard() == null ? null : daoRequest.getIdcard().trim());
        daoRequest.setAddress(daoRequest.getAddress() == null ? null : daoRequest.getAddress().trim());
        daoRequest.setEmail(daoRequest.getEmail() == null ? null : daoRequest.getEmail().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setDingtalkOpenid(daoRequest.getDingtalkOpenid() == null ? null : daoRequest.getDingtalkOpenid().trim());
        daoRequest.setDingtalkUnionid(daoRequest.getDingtalkUnionid() == null ? null : daoRequest.getDingtalkUnionid().trim());
        daoRequest.setDingtalkUserid(daoRequest.getDingtalkUserid() == null ? null : daoRequest.getDingtalkUserid().trim());
        daoRequest.setDescription(daoRequest.getDescription() == null ? null : daoRequest.getDescription().trim());

        return daoRequest;
    }
}
